<?php

namespace app\reporting\controller;
use  app\common\controller\DBase;
use app\common\controller\PCBase;
use app\reporting\logic\ReportVisitLogic;
use app\api\logic\TeamLogic;


class ReportVisit extends PCBase
{

    /**
     * @desc   获取报告信息
     * @author luckyXiong
     * @date   2024-11-05
     */
    public function getList(){
        $params     = $this->request->post();
        $adminId               = $this->getAdminId();
        $groupId               = $this->getAdminGroupId();
        $params['adminId']     = $adminId;
        $params['groupId']     = $groupId;
        return  (new ReportVisitLogic())->getList($params);
    }


    /**
     * @desc   获取报告导出信息
     * @author luckyXiong
     * @date   2024-11-05
     */
    public function exportReport(){
        $params   = $this->request->post();
        (new ReportVisitLogic())->exportReport($params);
        return  $this->jsonMessage(200, true, '操作成功',null);
    }



    /**
     * @desc   获取员工角色
     * @author luckyXiong
     * @date   2024-11-11
     */
    public function getRoleId(){
        $params   = $this->request->post();
        $params['admin_id'] = $this->getAdminId();
        $res      = (new ReportVisitLogic())->getRoleId($params);
        return  $this->jsonMessage(200, true, '操作成功',$res);
    }

    /**
     * @desc
     * @author luckyXiong
     * @date   2024-11-11
     */
    public function editRoleId(){
        $params   = $this->request->post();
        $res      = (new ReportVisitLogic())->editRoleId($params);
        return  $this->jsonMessage(200, true, '操作成功',$res);
    }



    /**
     * @desc   登陆页面访问情况
     * @author luckyXiong
     * @date   2025-03-13
     */
    public function getPathList(){
        $params   = $this->request->post();
        $res      = (new ReportVisitLogic())->getPathList($params);
        return  $this->jsonMessage(200, true, '操作成功',$res);
    }




    /**
     * @desc   获取报告导出页面访问情况
     * @author luckyXiong
     * @date   2025-03-13
     */
    public function exportPathReport(){
        $params   = $this->request->post();
        (new ReportVisitLogic())->exportPathReport($params);
        return  $this->jsonMessage(200, true, '操作成功',null);
    }


    /**
     * @desc   获取页面类型
     * @author luckyXiong
     * @date   2025-03-13
     */
    public function get_page_type(){
        $params   = $this->request->post();
        return (new ReportVisitLogic())->get_page_type($params);
    }




    /**
     * @desc   运营新增投放链接
     * @author luckyXiong
     * @date   2025-04-23
     */
    public function add_page_path(){
        $params   = $this->request->post();
        $params['admin_id']  = $this->getAdminId();
        return (new ReportVisitLogic())->add_page_path($params);
    }

    /**
     * @desc   运营新增投放链接
     * @author luckyXiong
     * @date   2025-04-23
     */
    public function get_page_path(){
        $params   = $this->request->post();
        $params['admin_id']  = $this->getAdminId();
        $params['group_id']  = $this->getAdminGroupId();
        return (new ReportVisitLogic())->get_page_path($params);
    }


    public function getHistoryVisitDetail(){
        $params   = $this->request->post();
        (new TeamLogic())->getHistoryVisitDetail($params);
        return  $this->jsonMessage(200, true, '操作成功',null);
    }



}